<div class="news-search">
    <div class="news-search-param">
        <div class="news-search-param-name">栏目分类：</div>
        <div class="news-search-param-value">
            <a class="label {if !$catid || $cat.child}label-success{else}label-default{/if}" href="{dr_search_url($params, 'catid', NULL)}">不限</a>
            <!--调用栏目分类，这种用法只能用于模块列表与搜索页面-->
            {loop $related $t}
            <a class="label {if $t.id==$catid}label-success{else}label-default{/if}" href="{dr_search_url($params, 'catid', $t.id)}">{$t.name}</a>
            {/loop}
        </div>
    </div>

    <!--调用栏目下面的商品属性筛选-->
    {php $property = dr_mall_property($catid);}
    {loop $property $oname $s}
    {php $oname='mall_'.$oname}
    <div class="news-search-param">
        <div class="news-search-param-name">{$s.name}：</div>
        <div class="news-search-param-value">
            <a class="label {if !strlen($params[$oname])}label-success{else}label-default{/if}" href="{dr_search_url($params, $oname, NULL)}">不限</a>
            {loop $s.value $v $n}
            <a class="label {if strlen($params[$oname]) && !strcmp($params[$oname], $v)}label-success{else}label-default{/if}" href="{dr_search_url($params, $oname, $v)}">{$n}</a>
            {/loop}
        </div>
    </div>
    {/loop}

    <div class="news-search-param">
        <div class="news-search-param-name">地区搜索：</div>
        <div class="news-search-param-value">
            <a class="label {if !$get.order_city || dr_linkage('address', $get.order_city, 0, 'child')}label-success{else}label-default{/if}" href="{dr_search_url($params, 'order_city', NULL)}">不限</a>

            <!--调用联动菜单address，pid为动态获取的地区id-->
            {linkage code=address pid=$get.order_city}
            <a class="label {if $t.id==$get.order_city}label-success{else}label-default{/if}" href="{dr_search_url($params, 'order_city', $t.id)}">{$t.name}</a>
            {/linkage}
        </div>
    </div>

    <div class="news-search-param">
        <div class="news-search-param-name">价格范围：</div>
        <div class="news-search-param-value">

            <!--自定义一个租金返回数组，这个都懂得，php最基础的数组用法-->
            {php $zujin=array('0,500'=>'500以内','500,1000'=>'500到1000','1000,2000'=>'1000到2000','2000,3000'=>'2000到3000','3000,0'=>'3000以上');}

            <a class="label {if !$get.order_price}label-success{else}label-default{/if}" href="{dr_search_url($params, 'order_price', NULL)}">不限</a>
            {loop $zujin $i $t}
            <a class="label {if $i==$get.order_price}label-success{else}label-default{/if}" href="{dr_search_url($params, 'order_price', $i)}">{$t}</a>
            {/loop}
        </div>
    </div>



    <div class="news-search-param">
        <div class="input-group">
            <input type="text" placeholder="输入关键字搜索" onkeypress="if(event.keyCode==13) {searchByClass();return false;}" name='keyword' value='{$keyword}' id='dr_search_keyword' class="form-control">
            <span class="input-group-btn"> <button class="btn default"  onclick="searchByClass()" type="button"> <i class="fa fa-search"></i> 搜索 </button> </span>
            <script type="text/javascript">
                function searchByClass(){
                    var url="{dr_search_url($params, 'keyword', 'phpkaiyuancms')}";
                    var value=$("#dr_search_keyword").val();
                    if (value) {
                        location.href=url.replace('phpkaiyuancms', value);
                    } else {
                        dr_tips("输入关键字");
                    }
                }
            </script>
        </div>
    </div>
</div>